//
//  GetConnection.h
//  XiMaLaYa
//
//  Created by dllo on 15/11/9.
//  Copyright (c) 2015年 L-G. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <AFNetworking.h>
#import <MBProgressHUD.h>

//设置超时时间
#define kTimeOutInterval 15

typedef void(^connectionBlock) (id responseObject);

@interface GetConnection : NSObject

@property (nonatomic, copy) connectionBlock block;

@property (nonatomic, retain)NSData *data;

//开始监听网络状态
+ (void)startMonitoringNetworkStatus;
//返回网络状态
+ (AFNetworkReachabilityStatus)networkReachabilityStatus;

+ (void)startGETConnection:(NSString *)url parmaters:(NSDictionary *)parmater connectionBlock:(connectionBlock)block;

@end
